<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">

    <body>

        <ui:composition template="./../Template.xhtml">


            <ui:define name="content">
                <h:form id="relat">
                    
                        <p:panelGrid columns="2">
                            <f:facet name="header">
                                Relatório de Acompanhamento dos LEIS
                            </f:facet>
                            <h:outputText value="Escola.:"/>
                            <p:selectOneMenu value="#{relatMensalFaces.selectedEscola}" converter="EscolaConverter">
                                <f:selectItem itemValue="#{null}" itemLabel="Selecione"/>
                                <f:selectItems value="#{escolaFaces.allEscolas}" var="esc" itemLabel="#{esc.escola}" itemValue="#{esc}"/>
                                <p:ajax update="meses" listener="#{relatMensalFaces.listaMeses()}" immediate="false"/>
                            </p:selectOneMenu>
                           
                                <h:outputText value="Mês.:"/>
                                <p:selectOneMenu value="#{relatMensalFaces.selectedRelatMensal.mes}" id="meses" required="true" label="Mês">
                                    <f:selectItem value="#{null}" itemLabel="Selecione"/>
                                    <f:selectItems value="#{relatMensalFaces.meses}" />
                                </p:selectOneMenu>
                        </p:panelGrid>

                   <p:commandButton  icon="img-new-Report"  action="#{relatMensalFaces.gerarRelatorioPDF()}" ajax="false" onclick="this.form.target = '_blank'" update="relat"/>
                </h:form>
            </ui:define>

          

        </ui:composition>

    </body>
</html>
